package test;

import java.io.IOException;

import generator.Main;

import org.junit.After;
import org.junit.Test;

import test.util.ConfigurationEditable;

public class AcceptanceTest5 {
	
	@Test
	public void canHandleThreeArguments() throws IOException {
		ConfigurationEditable.set("Competition Type", "lap");
		Main.loadAndGenerate(new String[] { "acceptanstest/acceptanstest5/starttider.txt",
				"acceptanstest/acceptanstest5/maltider.txt",
				"acceptanstest/acceptanstest5/namnfil.txt" });
	}

	@Test
	public void mainMergesNameStartStopAndTotal() throws IOException {
		ConfigurationEditable.set("Competition Type", "lap");
		Main.loadAndGenerate(new String[] { "acceptanstest/acceptanstest5/starttider.txt",
				"acceptanstest/acceptanstest5/maltider.txt",
				"acceptanstest/acceptanstest5/namnfil.txt" });

	}
	
	@After
	public void cleanup(){
		ConfigurationEditable.clear();
	}

}
